<html>
<head><meta charset="utf-8"><title>Duplicate symbol error #84604 · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html">Duplicate symbol error #84604</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="236445253"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236445253" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236445253">(Apr 28 2021 at 03:40)</a>:</h4>
<p>This error looks very similar to one we saw on <a href="https://github.com/rust-lang/rust/issues/83737">#83737</a> (specifically <a href="https://github.com/rust-lang/rust/issues/83737#issuecomment-814442445">this</a> comment)</p>



<a name="236445289"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236445289" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236445289">(Apr 28 2021 at 03:41)</a>:</h4>
<p><span class="user-mention" data-user-id="232957">@Jack Huey</span> do you think the binder refactor could be causing this as well?</p>



<a name="236445358"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236445358" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236445358">(Apr 28 2021 at 03:42)</a>:</h4>
<p>Probably</p>



<a name="236445419"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236445419" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236445419">(Apr 28 2021 at 03:43)</a>:</h4>
<p>I imagine <code>-Zinstrument-coverage</code> is generating an erased type, maybe. So there's one that has bound vars and one that doesn't. But they generate the same symbol</p>



<a name="236445473"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236445473" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236445473">(Apr 28 2021 at 03:44)</a>:</h4>
<p>A repro could help. Otherwise I have to look more into how instrument coverage works</p>



<a name="236445488"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236445488" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236445488">(Apr 28 2021 at 03:44)</a>:</h4>
<p>hmm, ok</p>



<a name="236445549"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236445549" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236445549">(Apr 28 2021 at 03:45)</a>:</h4>
<p>I can't think of when it would create a type</p>



<a name="236445573"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236445573" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236445573">(Apr 28 2021 at 03:45)</a>:</h4>
<p>it does codegen empty functions for unused functions and generics</p>



<a name="236445588"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236445588" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236445588">(Apr 28 2021 at 03:45)</a>:</h4>
<p>Hmm. So that's probably where the symbol is coming from</p>



<a name="236445644"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236445644" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236445644">(Apr 28 2021 at 03:46)</a>:</h4>
<p>Since it doesnt pop up without that flag</p>



<a name="236445687"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236445687" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236445687">(Apr 28 2021 at 03:47)</a>:</h4>
<p>yeah. okay, so we should check that code for <code>Binder</code> hygiene?</p>



<a name="236445738"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236445738" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236445738">(Apr 28 2021 at 03:47)</a>:</h4>
<p>or however it generates the symbol names</p>



<a name="236445817"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236445817" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236445817">(Apr 28 2021 at 03:48)</a>:</h4>
<p>though it's weird that it would be happening for a symbol which has another definition, when this is for unused functions</p>



<a name="236445909"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236445909" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236445909">(Apr 28 2021 at 03:49)</a>:</h4>
<p>Yeah, so theoretically the only difference between the two types that generates the same symbols are an unused set of bound vars</p>



<a name="236445971"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236445971" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236445971">(Apr 28 2021 at 03:50)</a>:</h4>
<p>This <em>isn't</em> captured in the symbol currently, since that only outputs <em>used</em> bound vars</p>



<a name="236446049"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236446049" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236446049">(Apr 28 2021 at 03:51)</a>:</h4>
<p>so then it's actually possible to trigger this in normal Rust right?</p>



<a name="236446144"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236446144" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236446144">(Apr 28 2021 at 03:52)</a>:</h4>
<p>Yes, which is why <a href="https://github.com/rust-lang/rust/issues/83737">#83737</a> is still open</p>



<a name="236446169"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236446169" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236446169">(Apr 28 2021 at 03:53)</a>:</h4>
<p>Currently, I've only seen this in the generator witness problem</p>



<a name="236446191"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236446191" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236446191">(Apr 28 2021 at 03:53)</a>:</h4>
<p>But I think there is potentially a more general problem around erasing regions but keeping bound vars</p>



<a name="236446312"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236446312" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236446312">(Apr 28 2021 at 03:55)</a>:</h4>
<p>I see, so the <a href="https://github.com/rust-lang/rust/issues/83737">#83737</a> regression likely came from not clearing bound variables when we were before</p>



<a name="236446368"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236446368" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236446368">(Apr 28 2021 at 03:56)</a>:</h4>
<p>Maybe the solution is to add a type flag for whether a type has bound vars that we need to clear</p>



<a name="236446381"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236446381" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236446381">(Apr 28 2021 at 03:56)</a>:</h4>
<p>Well, so what do you mean by before?</p>



<a name="236446396"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236446396" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236446396">(Apr 28 2021 at 03:56)</a>:</h4>
<p>before the binder refactor?</p>



<a name="236446405"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236446405" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236446405">(Apr 28 2021 at 03:56)</a>:</h4>
<p>Before the binder refactor, we didn't track bound vars</p>



<a name="236446417"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236446417" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236446417">(Apr 28 2021 at 03:57)</a>:</h4>
<p>ah :) right</p>



<a name="236446432"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236446432" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236446432">(Apr 28 2021 at 03:57)</a>:</h4>
<p>But now, there's this extra situation where we don't have any late bound vars in the type, but we have bound vars around</p>



<a name="236446444"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236446444" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236446444">(Apr 28 2021 at 03:57)</a>:</h4>
<p>And erasing should probably unconditionally remove the bound vars</p>



<a name="236446514"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236446514" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236446514">(Apr 28 2021 at 03:58)</a>:</h4>
<p>Right now, it won't descend into a type unless there are bound vars</p>



<a name="236446523"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236446523" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236446523">(Apr 28 2021 at 03:59)</a>:</h4>
<p>Hmm. Is that the right solution...</p>



<a name="236446927"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236446927" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Rich Kadel <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236446927">(Apr 28 2021 at 04:02)</a>:</h4>
<p>coverage does generate functions for unused generic functions, which still results in a valid mangled symbol name, and that's all we care about.</p>



<a name="236447159"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236447159" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236447159">(Apr 28 2021 at 04:05)</a>:</h4>
<p><span class="user-mention" data-user-id="296355">@Rich Kadel</span> I'm wondering if we need to be more careful about how that name is generated, to avoid duplicates</p>



<a name="236447218"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236447218" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236447218">(Apr 28 2021 at 04:06)</a>:</h4>
<p>though I still don't understand what kind of situation would lead to that</p>



<a name="236447273"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236447273" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236447273">(Apr 28 2021 at 04:07)</a>:</h4>
<p><span aria-label="shrug" class="emoji emoji-1f937" role="img" title="shrug">:shrug:</span>‍♀️I'm not entirely sure if there <em>is</em> something wrong with the codegen there</p>



<a name="236447294"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236447294" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Rich Kadel <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236447294">(Apr 28 2021 at 04:07)</a>:</h4>
<p>I think if the generated unused generic function was creating duplicates, then used generic functions would also generate duplicates when used with the same type (e.g., a common type like a primitive)</p>



<a name="236447367"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236447367" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236447367">(Apr 28 2021 at 04:08)</a>:</h4>
<p>In this case, the demangled symbol is <code>&lt;core::fmt::ArgumentV1&gt;::new::&lt;alloc::boxed::Box&lt;dyn predicates_core::core::Predicate&lt;str&gt; + core::marker::Send&gt;&gt;</code></p>



<a name="236447444"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236447444" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236447444">(Apr 28 2021 at 04:09)</a>:</h4>
<p>So I expect that there is something like <code>Box&lt;dyn Predicate&lt;str&gt; + Send&gt;</code> as well as a <code>Box&lt;dyn for&lt;'a&gt; Predicate&lt;str&gt; + Send&gt;</code></p>



<a name="236447596"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236447596" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236447596">(Apr 28 2021 at 04:11)</a>:</h4>
<p><span class="user-mention silent" data-user-id="296355">Rich Kadel</span> <a href="#narrow/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604/near/236447294">said</a>:</p>
<blockquote>
<p>I think if the generated unused generic function was creating duplicates, then used generic functions would also generate duplicates when used with the same type (e.g., a common type like a primitive)</p>
</blockquote>
<p>well, this situation does indeed happen but is what weak linkage is for. it tells the linker that these duplicates are "okay" and actually are all the exact same function</p>



<a name="236447690"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236447690" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236447690">(Apr 28 2021 at 04:12)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232957">Jack Huey</span> <a href="#narrow/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604/near/236446523">said</a>:</p>
<blockquote>
<p>Hmm. Is that the right solution...</p>
</blockquote>
<p>So, double checking this now. But the good news is that commenting out <a href="https://github.com/rust-lang/rust/blob/27bd3f51a90733aabee45a9019a3aa785eccfd05/compiler/rustc_middle/src/ty/erase_regions.rs#L24">this check</a> fixes the bug from <a href="https://github.com/rust-lang/rust/issues/83737">#83737</a></p>



<a name="236447698"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236447698" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236447698">(Apr 28 2021 at 04:12)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232957">Jack Huey</span> <a href="#narrow/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604/near/236447444">said</a>:</p>
<blockquote>
<p>So I expect that there is something like <code>Box&lt;dyn Predicate&lt;str&gt; + Send&gt;</code> as well as a <code>Box&lt;dyn for&lt;'a&gt; Predicate&lt;str&gt; + Send&gt;</code></p>
</blockquote>
<p>hmm. that would explain the situation, but not why we're only seeing it with <code>-Zinstrument-coverage</code></p>



<a name="236447708"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236447708" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236447708">(Apr 28 2021 at 04:13)</a>:</h4>
<p><code>-Zinstrument-coverage</code>, you mean?</p>



<a name="236447739"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236447739" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236447739">(Apr 28 2021 at 04:13)</a>:</h4>
<p>yes <span aria-label="face palm" class="emoji emoji-1f926" role="img" title="face palm">:face_palm:</span> getting late :)</p>



<a name="236447888"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236447888" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236447888">(Apr 28 2021 at 04:15)</a>:</h4>
<p>So, uh, if I put up a patch, could someone check if it fixes the bug?</p>



<a name="236447898"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236447898" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236447898">(Apr 28 2021 at 04:15)</a>:</h4>
<p>yes!</p>



<a name="236447967"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236447967" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236447967">(Apr 28 2021 at 04:16)</a>:</h4>
<p>Okay give me two minutes</p>



<a name="236448134"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236448134" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236448134">(Apr 28 2021 at 04:19)</a>:</h4>
<p><a href="https://github.com/jackh726/rust/tree/always-erase">https://github.com/jackh726/rust/tree/always-erase</a></p>



<a name="236448199"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236448199" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236448199">(Apr 28 2021 at 04:20)</a>:</h4>
<p>Let me know if there's something more you need me to do</p>



<a name="236448207"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236448207" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236448207">(Apr 28 2021 at 04:20)</a>:</h4>
<p>All in all, an extremely small patch</p>



<a name="236448236"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236448236" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236448236">(Apr 28 2021 at 04:20)</a>:</h4>
<p>But assuming it's the same bug as in <a href="https://github.com/rust-lang/rust/issues/83737">#83737</a> <em>and</em> this really does fix that, then <em>shrug</em></p>



<a name="236448366"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236448366" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236448366">(Apr 28 2021 at 04:22)</a>:</h4>
<p>we'll know something we didn't either way</p>



<a name="236448537"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236448537" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236448537">(Apr 28 2021 at 04:25)</a>:</h4>
<p>:)</p>



<a name="236450025"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236450025" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236450025">(Apr 28 2021 at 04:47)</a>:</h4>
<p>Yep, just confirmed. That small changes fixes <a href="https://github.com/rust-lang/rust/issues/83737">#83737</a></p>



<a name="236465336"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236465336" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236465336">(Apr 28 2021 at 07:54)</a>:</h4>
<p>A small reproducer:</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="k">pub</span><span class="w"> </span><span class="k">fn</span> <span class="nf">f</span><span class="o">&lt;</span><span class="n">T</span>: <span class="o">?</span><span class="nb">Sized</span><span class="o">&gt;</span><span class="p">()</span><span class="w"> </span><span class="p">{}</span><span class="w"></span>
<span class="k">pub</span><span class="w"> </span><span class="k">trait</span><span class="w"> </span><span class="n">Frob</span><span class="o">&lt;</span><span class="n">T</span>: <span class="o">?</span><span class="nb">Sized</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{}</span><span class="w"></span>
<span class="k">fn</span> <span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">f</span>::<span class="o">&lt;</span><span class="k">dyn</span><span class="w"> </span><span class="n">Frob</span><span class="o">&lt;</span><span class="kt">str</span><span class="o">&gt;&gt;</span><span class="p">();</span><span class="w"></span>
<span class="w">    </span><span class="n">f</span>::<span class="o">&lt;</span><span class="k">dyn</span><span class="w"> </span><span class="k">for</span><span class="o">&lt;'</span><span class="na">a</span><span class="o">&gt;</span><span class="w"> </span><span class="n">Frob</span><span class="o">&lt;</span><span class="kt">str</span><span class="o">&gt;&gt;</span><span class="p">();</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>
<p>Without a fix we create two different mono items here. In legacy mangling the hash is different so there is no symbol conflict, but in v0 (enabled by code coverage) the resulting symbol name for both is the same.</p>



<a name="236505520"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236505520" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236505520">(Apr 28 2021 at 13:22)</a>:</h4>
<p>Well, that would make sense, actually, why we have problems in <code>-Zinstrument-coverage</code>, if <code>v0</code> symbol mangling gets enabled</p>



<a name="236507600"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236507600" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236507600">(Apr 28 2021 at 13:36)</a>:</h4>
<p>I can</p>



<a name="236507621"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236507621" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236507621">(Apr 28 2021 at 13:36)</a>:</h4>
<p>I can't repro the issue though :/</p>



<a name="236507937"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236507937" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236507937">(Apr 28 2021 at 13:38)</a>:</h4>
<p>FYI: I was reproducing this with <code>rustc 1.53.0-nightly (727d10156 2021-04-27)</code> with <code>-Zinstrument-coverage</code> or <code>-Zsymbol-mangling-version=v0</code>.</p>



<a name="236507975"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236507975" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236507975">(Apr 28 2021 at 13:38)</a>:</h4>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="c1">// check-pass</span>
<span class="c1">// compile-flags: -Zsymbol-mangling-version=v0</span>

<span class="k">pub</span><span class="w"> </span><span class="k">fn</span> <span class="nf">f</span><span class="o">&lt;</span><span class="n">T</span>: <span class="o">?</span><span class="nb">Sized</span><span class="o">&gt;</span><span class="p">()</span><span class="w"> </span><span class="p">{}</span><span class="w"></span>
<span class="k">pub</span><span class="w"> </span><span class="k">trait</span><span class="w"> </span><span class="n">Frob</span><span class="o">&lt;</span><span class="n">T</span>: <span class="o">?</span><span class="nb">Sized</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{}</span><span class="w"></span>
<span class="k">fn</span> <span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">f</span>::<span class="o">&lt;</span><span class="k">dyn</span><span class="w"> </span><span class="n">Frob</span><span class="o">&lt;</span><span class="kt">str</span><span class="o">&gt;&gt;</span><span class="p">();</span><span class="w"></span>
<span class="w">    </span><span class="n">f</span>::<span class="o">&lt;</span><span class="k">dyn</span><span class="w"> </span><span class="k">for</span><span class="o">&lt;'</span><span class="na">a</span><span class="o">&gt;</span><span class="w"> </span><span class="n">Frob</span><span class="o">&lt;</span><span class="kt">str</span><span class="o">&gt;&gt;</span><span class="p">();</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</code></pre></div>



<a name="236508014"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236508014" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236508014">(Apr 28 2021 at 13:38)</a>:</h4>
<p>That runs fine for me</p>



<a name="236508118"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236508118" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tm <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236508118">(Apr 28 2021 at 13:39)</a>:</h4>
<p>check-pass stops too early to detect the issue</p>



<a name="236508168"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236508168" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236508168">(Apr 28 2021 at 13:40)</a>:</h4>
<p><span aria-label="face palm" class="emoji emoji-1f926" role="img" title="face palm">:face_palm:</span>‍♀️right</p>



<a name="236508348"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236508348" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236508348">(Apr 28 2021 at 13:41)</a>:</h4>
<p>"error: ui test compiled successfully!"</p>



<a name="236508388"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236508388" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236508388">(Apr 28 2021 at 13:41)</a>:</h4>
<p>Probably need run-pass</p>



<a name="236508418"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236508418" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236508418">(Apr 28 2021 at 13:41)</a>:</h4>
<p>yep</p>



<a name="236508420"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236508420" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236508420">(Apr 28 2021 at 13:41)</a>:</h4>
<p>okay good</p>



<a name="236509428"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236509428" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236509428">(Apr 28 2021 at 13:47)</a>:</h4>
<p>And the fix I gave above fixes this issue too</p>



<a name="236570350"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236570350" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236570350">(Apr 28 2021 at 20:10)</a>:</h4>
<p>okay we tried testing the fix but are getting an ICE now</p>



<a name="236570445"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236570445" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236570445">(Apr 28 2021 at 20:10)</a>:</h4>
<p><code>Not enough bound vars: BoundRegion { var: 0, kind: BrNamed(DefId(0:152 ~ packet[8787]::records::{impl#2}::'a), 'a) } not found in []</code></p>



<a name="236570471"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236570471" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236570471">(Apr 28 2021 at 20:11)</a>:</h4>
<p>here's the <a href="https://gist.github.com/tmandry/637975d4ec8fe48da9351869809a5c28">full backtrace</a></p>



<a name="236570480"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236570480" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236570480">(Apr 28 2021 at 20:11)</a>:</h4>
<p><span aria-label="speechless" class="emoji emoji-1f636" role="img" title="speechless">:speechless:</span></p>



<a name="236570568"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236570568" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236570568">(Apr 28 2021 at 20:11)</a>:</h4>
<p>I think this is on a different target</p>



<a name="236570685"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236570685" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236570685">(Apr 28 2021 at 20:12)</a>:</h4>
<p>oh actually</p>



<a name="236570785"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236570785" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236570785">(Apr 28 2021 at 20:13)</a>:</h4>
<p>it doesn't seem like this is caused by your patch <span class="user-mention" data-user-id="232957">@Jack Huey</span>. maybe there's something else going on</p>



<a name="236570895"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236570895" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236570895">(Apr 28 2021 at 20:14)</a>:</h4>
<p>Yeah, I mean this is definitely something different</p>



<a name="236571122"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236571122" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236571122">(Apr 28 2021 at 20:15)</a>:</h4>
<p>But, I mean, it's probably <em>real</em></p>



<a name="236571245"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236571245" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236571245">(Apr 28 2021 at 20:16)</a>:</h4>
<p>my current theory is it's only happening on debug builds</p>



<a name="236571259"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236571259" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236571259">(Apr 28 2021 at 20:16)</a>:</h4>
<p>of rustc</p>



<a name="236571406"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236571406" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236571406">(Apr 28 2021 at 20:17)</a>:</h4>
<p>That would be correct</p>



<a name="236571439"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236571439" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236571439">(Apr 28 2021 at 20:17)</a>:</h4>
<p>though that check isn't a debug_assert or anything</p>



<a name="236571457"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236571457" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236571457">(Apr 28 2021 at 20:17)</a>:</h4>
<p>well</p>



<a name="236571529"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236571529" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236571529">(Apr 28 2021 at 20:18)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/blob/c488f15700f15664b3bbda742c3f53f2b7a508d9/compiler/rustc_middle/src/ty/sty.rs#L1058">https://github.com/rust-lang/rust/blob/c488f15700f15664b3bbda742c3f53f2b7a508d9/compiler/rustc_middle/src/ty/sty.rs#L1058</a></p>



<a name="236571565"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236571565" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236571565">(Apr 28 2021 at 20:18)</a>:</h4>
<p>Bound var validation is specifically under <code>debug_assertions</code></p>



<a name="236571620"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236571620" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236571620">(Apr 28 2021 at 20:18)</a>:</h4>
<p>I'm wondering if we turn this on for a couple days to see what pops up, then turn it off before beta cut</p>



<a name="236571655"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236571655" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236571655">(Apr 28 2021 at 20:19)</a>:</h4>
<p>aha</p>



<a name="236571849"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236571849" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236571849">(Apr 28 2021 at 20:20)</a>:</h4>
<p>Theoretically, <em>not</em> having the bound vars be correct <em>shouldn't</em> break anything, since nothing uses them (yet)</p>



<a name="236571879"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236571879" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236571879">(Apr 28 2021 at 20:20)</a>:</h4>
<p>But yeah, it'll pop up in debug assertions</p>



<a name="236572486"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236572486" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236572486">(Apr 28 2021 at 20:24)</a>:</h4>
<p>okay, I see. once we're past this hurdle we can see if this is firing on anything that's easy to reproduce</p>



<a name="236572746"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236572746" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236572746">(Apr 28 2021 at 20:26)</a>:</h4>
<p>I mean, I would immediately go look at <code>packet[8787]::records::{impl#2}::'a</code></p>



<a name="236572776"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236572776" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236572776">(Apr 28 2021 at 20:27)</a>:</h4>
<p>This is getting called from <a href="https://github.com/jackh726/rust/blob/7205474d6e2d251501ea0b9958402fe150fad539/compiler/rustc_infer/src/traits/util.rs#L310">https://github.com/jackh726/rust/blob/7205474d6e2d251501ea0b9958402fe150fad539/compiler/rustc_infer/src/traits/util.rs#L310</a></p>



<a name="236573297"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236573297" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236573297">(Apr 28 2021 at 20:31)</a>:</h4>
<p>I think that's <a href="https://cs.opensource.google/fuchsia/fuchsia/+/master:src/lib/network/packet/src/records.rs;l=87">this one</a></p>



<a name="236573588"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236573588" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236573588">(Apr 28 2021 at 20:33)</a>:</h4>
<p>There's no <code>'a</code> though</p>



<a name="236573610"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236573610" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236573610">(Apr 28 2021 at 20:33)</a>:</h4>
<p>oh, it's the <a href="https://cs.opensource.google/fuchsia/fuchsia/+/master:src/lib/network/packet/src/records.rs;l=97">next one</a></p>



<a name="236573618"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236573618" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236573618">(Apr 28 2021 at 20:33)</a>:</h4>
<p>yeah</p>



<a name="236573744"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236573744" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236573744">(Apr 28 2021 at 20:34)</a>:</h4>
<p>I was using 1-indexing, heh</p>



<a name="236574162"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236574162" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236574162">(Apr 28 2021 at 20:37)</a>:</h4>
<p>the problem is happening during type checking of <em>one</em>  of the those functions in that impl</p>



<a name="236574247"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236574247" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236574247">(Apr 28 2021 at 20:38)</a>:</h4>
<p>Did you get the query stacktrace too?</p>



<a name="236574379"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236574379" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236574379">(Apr 28 2021 at 20:39)</a>:</h4>
<p>oh yeah, sorry I cut it short</p>



<a name="236574448"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236574448" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236574448">(Apr 28 2021 at 20:40)</a>:</h4>
<p>updated the gist</p>



<a name="236574554"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236574554" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236574554">(Apr 28 2021 at 20:41)</a>:</h4>
<p>Okay <code>parse_raw_with_context</code></p>



<a name="236574580"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236574580" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236574580">(Apr 28 2021 at 20:41)</a>:</h4>
<p>Specifically when trying to lower the return type <code>MaybeParsed&lt;Self, (B, R::Error)&gt;</code></p>



<a name="236575209"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236575209" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236575209">(Apr 28 2021 at 20:45)</a>:</h4>
<p>That tuple <code>(B, R::Error)</code></p>



<a name="236576059"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236576059" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236576059">(Apr 28 2021 at 20:51)</a>:</h4>
<p><code>R::Error</code></p>



<a name="236584056"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236584056" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236584056">(Apr 28 2021 at 21:29)</a>:</h4>
<p>Okay, so <code>find_bound_for_assoc_item</code></p>



<a name="236584078"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236584078" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236584078">(Apr 28 2021 at 21:29)</a>:</h4>
<p>There's a few moving parts here</p>



<a name="236584105"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236584105" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236584105">(Apr 28 2021 at 21:29)</a>:</h4>
<p>The first is that call to <code>get_type_parameter_bounds</code></p>



<a name="236584203"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236584203" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236584203">(Apr 28 2021 at 21:30)</a>:</h4>
<p>I would <em>expect</em> that to give something like <code>R: for&lt;'a&gt; RecordsRawImpl&lt;'a&gt;</code></p>



<a name="236584483"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236584483" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236584483">(Apr 28 2021 at 21:32)</a>:</h4>
<p>Which means we would be getting that from <code>self.param_env.caller_bounds()</code></p>



<a name="236584563"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236584563" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236584563">(Apr 28 2021 at 21:32)</a>:</h4>
<p>If we <em>aren't</em> getting that, then that would mean something further up</p>



<a name="236584581"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236584581" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236584581">(Apr 28 2021 at 21:33)</a>:</h4>
<p>Which is a rabbit hole, so let's continue</p>



<a name="236584719"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236584719" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236584719">(Apr 28 2021 at 21:33)</a>:</h4>
<p>So, we call <code>transitive_bounds_that_define_assoc_type</code> with the relevant bounds</p>



<a name="236584851"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236584851" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236584851">(Apr 28 2021 at 21:34)</a>:</h4>
<p>In this case, this return value from <code>get_type_parameter_bounds</code></p>



<a name="236584890"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236584890" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236584890">(Apr 28 2021 at 21:35)</a>:</h4>
<p>So far, nothing jumps out</p>



<a name="236584895"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236584895" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236584895">(Apr 28 2021 at 21:35)</a>:</h4>
<p><code>transitive_bounds_that_define_assoc_type</code></p>



<a name="236584966"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236584966" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236584966">(Apr 28 2021 at 21:35)</a>:</h4>
<p>So, first thing we do is take our trait ref</p>



<a name="236584977"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236584977" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236584977">(Apr 28 2021 at 21:35)</a>:</h4>
<p>And call <code>super_predicates_that_define_assoc_type</code> for the trait (<code>RecordsRawImpl</code>)</p>



<a name="236585184"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236585184" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236585184">(Apr 28 2021 at 21:37)</a>:</h4>
<p>The bounds on that are <code>:RecordsImplLayout </code></p>



<a name="236585572"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236585572" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236585572">(Apr 28 2021 at 21:41)</a>:</h4>
<p>Sheesh what a rabbit hole</p>



<a name="236585762"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236585762" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236585762">(Apr 28 2021 at 21:43)</a>:</h4>
<p>Let me back up</p>



<a name="236585775"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236585775" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236585775">(Apr 28 2021 at 21:43)</a>:</h4>
<p>So, the trait ref <code>R: for&lt;'a&gt; RecordsRawImpl&lt;'a&gt;</code></p>



<a name="236585940"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236585940" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236585940">(Apr 28 2021 at 21:45)</a>:</h4>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="kd">let</span><span class="w"> </span><span class="n">subst_predicate</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">super_predicate</span><span class="p">.</span><span class="n">subst_supertrait</span><span class="p">(</span><span class="n">tcx</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="n">bound_predicate</span><span class="p">.</span><span class="n">rebind</span><span class="p">(</span><span class="n">trait_ref</span><span class="p">.</span><span class="n">skip_binder</span><span class="p">()));</span><span class="w"></span>
</code></pre></div>



<a name="236585950"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236585950" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236585950">(Apr 28 2021 at 21:45)</a>:</h4>
<p>I think the order there is wrong</p>



<a name="236586016"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236586016" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236586016">(Apr 28 2021 at 21:46)</a>:</h4>
<p>I think it needs to be <code>super_predicate.subst_supertrait(tcx, &amp;bound_predicate).rebind(trait_ref.skip_binder())</code></p>



<a name="236586230"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236586230" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236586230">(Apr 28 2021 at 21:48)</a>:</h4>
<p>wait wait wait</p>



<a name="236586263"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236586263" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236586263">(Apr 28 2021 at 21:48)</a>:</h4>
<div class="codehilite"><pre><span></span><code>let bound_predicate = super_predicate.kind();
let subst_predicate = super_predicate
    .subst_supertrait(tcx, &amp;bound_predicate.rebind(trait_ref.skip_binder()));
</code></pre></div>



<a name="236586426"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236586426" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236586426">(Apr 28 2021 at 21:50)</a>:</h4>
<p><code>super_predicate</code>/<code>bound_predicate</code> is <code>Self: RecordsImplLayout</code></p>



<a name="236586439"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236586439" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236586439">(Apr 28 2021 at 21:50)</a>:</h4>
<p>We're completely losing the bound vars on <code>trait_ref</code></p>



<a name="236586500"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236586500" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236586500">(Apr 28 2021 at 21:50)</a>:</h4>
<p>We <em>want</em> <code>for&lt;'a&gt; R: RecordsImplLayout</code></p>



<a name="236587059"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236587059" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236587059">(Apr 28 2021 at 21:56)</a>:</h4>
<p>I think we just want</p>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="kd">let</span><span class="w"> </span><span class="n">subst_predicate</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">super_predicate</span><span class="p">.</span><span class="n">subst_supertrait</span><span class="p">(</span><span class="n">tcx</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="n">trait_ref</span><span class="p">);</span><span class="w"></span>
</code></pre></div>



<a name="236588661"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236588661" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236588661">(Apr 28 2021 at 22:12)</a>:</h4>
<p><span class="user-mention" data-user-id="116883">@tmandry</span> want to test another patch <span aria-label="grinning face with smiling eyes" class="emoji emoji-1f601" role="img" title="grinning face with smiling eyes">:grinning_face_with_smiling_eyes:</span> <a href="https://github.com/jackh726/rust/tree/transitive_bounds_rebind">https://github.com/jackh726/rust/tree/transitive_bounds_rebind</a></p>



<a name="236589732"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236589732" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236589732">(Apr 28 2021 at 22:23)</a>:</h4>
<p><span class="user-mention" data-user-id="408606">@Adrian Danis</span></p>



<a name="236591308"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236591308" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236591308">(Apr 28 2021 at 22:39)</a>:</h4>
<p>Btw thanks for being guinea pigs :)</p>



<a name="236600893"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236600893" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Adrian Danis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236600893">(Apr 29 2021 at 00:27)</a>:</h4>
<p><span class="user-mention" data-user-id="232957">@Jack Huey</span> can confirm that <a href="https://github.com/jackh726/rust/tree/always-erase">https://github.com/jackh726/rust/tree/always-erase</a> fixes <a href="https://github.com/rust-lang/rust/issues/84604">#84604</a> (now that I'm building without debug). will run <a href="https://github.com/jackh726/rust/tree/transitive_bounds_rebind">https://github.com/jackh726/rust/tree/transitive_bounds_rebind</a> now to be sure</p>



<a name="236603938"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236603938" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Adrian Danis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236603938">(Apr 29 2021 at 01:07)</a>:</h4>
<p>and no surprise, that also fixes it <span aria-label="thumbs up" class="emoji emoji-1f44d" role="img" title="thumbs up">:thumbs_up:</span></p>



<a name="236605381"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236605381" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236605381">(Apr 29 2021 at 01:28)</a>:</h4>
<p>Whoop</p>



<a name="236605661"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236605661" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236605661">(Apr 29 2021 at 01:32)</a>:</h4>
<p>Wait <span class="user-mention" data-user-id="408606">@Adrian Danis</span> did you have debug off when you tested the <code>transitive_bounds_rebind</code> branch?</p>



<a name="236605687"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236605687" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Adrian Danis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236605687">(Apr 29 2021 at 01:32)</a>:</h4>
<p>wait. I just tested <a href="https://github.com/rust-lang/rust/pull/84653">https://github.com/rust-lang/rust/pull/84653</a>, which is (<a href="https://github.com/jackh726/rust/tree/erase-flags">https://github.com/jackh726/rust/tree/erase-flags</a>), not <a href="https://github.com/jackh726/rust/tree/transitive_bounds_rebind">https://github.com/jackh726/rust/tree/transitive_bounds_rebind</a></p>



<a name="236605690"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236605690" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Adrian Danis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236605690">(Apr 29 2021 at 01:32)</a>:</h4>
<p>yeah I jsut noticed that myself</p>



<a name="236605716"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236605716" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Adrian Danis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236605716">(Apr 29 2021 at 01:32)</a>:</h4>
<p>I am rebuilding with debug on right now</p>



<a name="236605741"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236605741" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236605741">(Apr 29 2021 at 01:33)</a>:</h4>
<p>Thank you</p>



<a name="236606081"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236606081" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Adrian Danis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236606081">(Apr 29 2021 at 01:37)</a>:</h4>
<p>yep just reproduced the assertion failure, I'll patch in the right branch this time and see what happens</p>



<a name="236608634"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236608634" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Adrian Danis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236608634">(Apr 29 2021 at 02:11)</a>:</h4>
<p>okay so with a debug build without your branch I get the <code>error: internal compiler error: compiler/rustc_middle/src/ty/fold.rs:908:21: Not enough bound vars: BoundRegion { var: 0, kind: BrNamed(DefId(0:152 ~ packet[8787]::records::{impl#2}::'a), 'a) } not found in []</code> error.<br>
With your branch the build seems to get further, but ultimately I still get <code>thread 'rustc' panicked at 'assertion failed: !self.span_bcb_is_dominated_by(self.prev(), self.curr())', compiler/rustc_mir/src/transform/coverage/spans.rs:569:9</code></p>



<a name="236608734"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236608734" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236608734">(Apr 29 2021 at 02:12)</a>:</h4>
<p>Well uh...that doesn't' seem related at all</p>



<a name="236608759"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236608759" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236608759">(Apr 29 2021 at 02:13)</a>:</h4>
<p>Assertion: <a href="https://github.com/rust-lang/rust/blob/50ca3ac24f08cc6c8bbef9ac27245f83f30bc749/compiler/rustc_mir/src/transform/coverage/spans.rs#L569">https://github.com/rust-lang/rust/blob/50ca3ac24f08cc6c8bbef9ac27245f83f30bc749/compiler/rustc_mir/src/transform/coverage/spans.rs#L569</a></p>



<a name="236608867"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236608867" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Adrian Danis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236608867">(Apr 29 2021 at 02:15)</a>:</h4>
<p>yeah I think is unrelated. I believe <a href="https://github.com/rust-lang/rust/pull/84582">https://github.com/rust-lang/rust/pull/84582</a> is supposed to help with this assertion, so trying that as well now</p>



<a name="236611616"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236611616" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Adrian Danis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236611616">(Apr 29 2021 at 02:56)</a>:</h4>
<p>okay well I still get that assertion failure, but your changes do fix the other failures so I'll keep investigating this one separately</p>



<a name="236614149"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236614149" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236614149">(Apr 29 2021 at 03:36)</a>:</h4>
<p>Hmm. I'm not sure they're related, but I'm not sure they're <em>not</em> related.</p>



<a name="236614172"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236614172" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236614172">(Apr 29 2021 at 03:36)</a>:</h4>
<p>Because I don't know anything about the coverage transform</p>



<a name="236671206"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236671206" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236671206">(Apr 29 2021 at 13:21)</a>:</h4>
<p>can someone summarize the current status here?</p>



<a name="236676262"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236676262" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236676262">(Apr 29 2021 at 13:52)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> this spawned <a href="https://github.com/rust-lang/rust/issues/84682">#84682</a> and there seems to be another (probably unrelated) bug in the coverage transform</p>



<a name="236735478"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236735478" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Rich Kadel <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236735478">(Apr 29 2021 at 19:59)</a>:</h4>
<p><span class="user-mention" data-user-id="232957">@Jack Huey</span> I just cherry-picked your PR commits to rebuild Fuchsia, and I'm still getting errors. I have the compiler output with <code>-Zverbose</code>. Any preference where I should paste it?</p>



<a name="236735580"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236735580" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236735580">(Apr 29 2021 at 19:59)</a>:</h4>
<p>Oh :(</p>



<a name="236735590"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236735590" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236735590">(Apr 29 2021 at 20:00)</a>:</h4>
<p>No preference</p>



<a name="236735742"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236735742" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Rich Kadel <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236735742">(Apr 29 2021 at 20:00)</a>:</h4>
<p>I'll drop it in the PR comments then</p>



<a name="236736021"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236736021" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236736021">(Apr 29 2021 at 20:02)</a>:</h4>
<p>Oh, we were talking about that above. Should be fixed by <a href="https://github.com/rust-lang/rust/issues/84682">#84682</a></p>



<a name="236736420"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236736420" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236736420">(Apr 29 2021 at 20:04)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> can you please look at <a href="https://github.com/rust-lang/rust/issues/84682">#84682</a> today? Very very easy review but if you r+ that one, I will close <a href="https://github.com/rust-lang/rust/issues/84653">#84653</a> since that's what it is rebased on</p>



<a name="236736423"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236736423" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Rich Kadel <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236736423">(Apr 29 2021 at 20:04)</a>:</h4>
<p>I see.... Sorry, I missed that</p>



<a name="236736591"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236736591" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Rich Kadel <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236736591">(Apr 29 2021 at 20:05)</a>:</h4>
<p>nit: <a href="https://github.com/rust-lang/rust/issues/84653">#84653</a> PR comment says it fixes a couple of issues. I'm not sure it does without your second PR (unless this is somehow different)</p>



<a name="236737135"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236737135" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236737135">(Apr 29 2021 at 20:09)</a>:</h4>
<p>This is different</p>



<a name="236737159"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236737159" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Rich Kadel <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236737159">(Apr 29 2021 at 20:09)</a>:</h4>
<p>ok, thanks</p>



<a name="236737190"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236737190" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236737190">(Apr 29 2021 at 20:10)</a>:</h4>
<p>This new issue is only being caught now because debug asserts are on</p>



<a name="236737397"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236737397" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Rich Kadel <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236737397">(Apr 29 2021 at 20:11)</a>:</h4>
<p>ah, gotcha</p>



<a name="236737725"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236737725" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Rich Kadel <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236737725">(Apr 29 2021 at 20:13)</a>:</h4>
<p>Now I know why I was confused. There was also a bug in coverage that showed up when Adrian built with debug asserts, so when he mentioned debug asserts last night, I thought he was referring to my bug (which was fixed and merged a couple of days ago, coincidentally)</p>



<a name="236737743"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236737743" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Rich Kadel <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236737743">(Apr 29 2021 at 20:13)</a>:</h4>
<p>Sorry for my confusion</p>



<a name="236738137"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236738137" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236738137">(Apr 29 2021 at 20:16)</a>:</h4>
<p>No worries :) That bug also got run into haha</p>



<a name="236741176"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236741176" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236741176">(Apr 29 2021 at 20:37)</a>:</h4>
<p><span class="user-mention silent" data-user-id="232957">Jack Huey</span> <a href="#narrow/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604/near/236736420">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> can you please look at <a href="https://github.com/rust-lang/rust/issues/84682">#84682</a> today? Very very easy review but if you r+ that one, I will close <a href="https://github.com/rust-lang/rust/issues/84653">#84653</a> since that's what it is rebased on</p>
</blockquote>
<p>r+'d</p>



<a name="236745659"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236745659" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Rich Kadel <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236745659">(Apr 29 2021 at 21:05)</a>:</h4>
<p><span class="user-mention" data-user-id="232957">@Jack Huey</span> Any chance you can add <a href="https://github.com/rust-lang/rust/issues/84582">#84582</a> to your rollup? It shouldn't conflict, and (I'm pretty confident) is well tested. We're trying to get your fix and that PR landed, and my PR was next in the bors queue until a few minutes ago when like 5 PRs jumped in front of me ;-)</p>



<a name="236745789"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236745789" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236745789">(Apr 29 2021 at 21:05)</a>:</h4>
<p>Sure</p>



<a name="236857196"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236857196" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236857196">(Apr 30 2021 at 15:50)</a>:</h4>
<p>so <span class="user-mention" data-user-id="232957">@Jack Huey</span> regarding <a href="https://github.com/rust-lang/rust/issues/84559">#84559</a>...</p>



<a name="236857324"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236857324" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236857324">(Apr 30 2021 at 15:50)</a>:</h4>
<p><em>oh</em></p>



<a name="236857335"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236857335" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236857335">(Apr 30 2021 at 15:51)</a>:</h4>
<p>i see what this is doing</p>



<a name="236857405"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236857405" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236857405">(Apr 30 2021 at 15:51)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604/near/236857324">said</a>:</p>
<blockquote>
<p><em>oh</em></p>
</blockquote>
<p>When you see this, you realize this is complicated</p>



<a name="236857467"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236857467" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236857467">(Apr 30 2021 at 15:52)</a>:</h4>
<p>i hate that code</p>



<a name="236857497"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236857497" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236857497">(Apr 30 2021 at 15:52)</a>:</h4>
<p>left a comment</p>



<a name="236857502"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236857502" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236857502">(Apr 30 2021 at 15:52)</a>:</h4>
<p><span aria-label="rolling eyes" class="emoji emoji-1f644" role="img" title="rolling eyes">:rolling_eyes:</span></p>



<a name="236857517"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236857517" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236857517">(Apr 30 2021 at 15:52)</a>:</h4>
<p><span class="user-mention silent" data-user-id="116009">nikomatsakis</span> <a href="#narrow/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604/near/236857467">said</a>:</p>
<blockquote>
<p>i hate that code</p>
</blockquote>
<p>(the code that picks a victim, not your PR :)</p>



<a name="236857588"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236857588" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236857588">(Apr 30 2021 at 15:53)</a>:</h4>
<p>Okay, so I thought about just picking the one the candidate with no bound vars</p>



<a name="236857638"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236857638" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236857638">(Apr 30 2021 at 15:53)</a>:</h4>
<p>But I was imagining there's probably a case we can make where there are the same number of bound vars but different names</p>



<a name="236857756"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236857756" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236857756">(Apr 30 2021 at 15:54)</a>:</h4>
<p>With something like a <code>pub trait DeserializeOwned2: for&lt;'b&gt; Deserialize&lt;'b&gt; {}</code></p>



<a name="236857772"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236857772" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236857772">(Apr 30 2021 at 15:54)</a>:</h4>
<p>and <code>B::Config: DeserializeOwned2</code></p>



<a name="236857873"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236857873" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236857873">(Apr 30 2021 at 15:55)</a>:</h4>
<p>Completely pathological, but valid</p>



<a name="236857942"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236857942" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236857942">(Apr 30 2021 at 15:56)</a>:</h4>
<p>That said, we <em>could</em> make it first prioritize fewer bound vars</p>



<a name="236859384"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236859384" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236859384">(Apr 30 2021 at 16:05)</a>:</h4>
<p>sure</p>



<a name="236859416"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236859416" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236859416">(Apr 30 2021 at 16:05)</a>:</h4>
<p>I was considering suggesting sorting</p>



<a name="236859428"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236859428" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236859428">(Apr 30 2021 at 16:05)</a>:</h4>
<p>that's the 'right thing'</p>



<a name="236859452"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236859452" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236859452">(Apr 30 2021 at 16:05)</a>:</h4>
<p>which would also pick the empty list first, presumably</p>



<a name="236860348"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236860348" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236860348">(Apr 30 2021 at 16:11)</a>:</h4>
<p>Okay, so first pick the fewest bound vars and then the first?</p>



<a name="236866335"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236866335" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236866335">(Apr 30 2021 at 16:53)</a>:</h4>
<p><span class="user-mention" data-user-id="232957">@Jack Huey</span> hmm. Yes, that's probalby what we want</p>



<a name="236866361"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236866361" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236866361">(Apr 30 2021 at 16:53)</a>:</h4>
<p>I was at first goin to say "sort" but I guess you would rather have <code>['b]</code> then <code>['a, 'c]</code></p>



<a name="236866499"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236866499" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236866499">(Apr 30 2021 at 16:54)</a>:</h4>
<p>It's possible the candidates are already sorted</p>



<a name="236866510"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/Duplicate%20symbol%20error%20%2384604/near/236866510" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jack Huey <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604.html#236866510">(Apr 30 2021 at 16:54)</a>:</h4>
<p>But I don't <em>know</em> that</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>